package com.orange.cas.server.config;

import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.services.ServiceRegistry;
import org.apereo.cas.services.ServiceRegistryExecutionPlan;
import org.apereo.cas.services.ServiceRegistryExecutionPlanConfigurer;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration("myConfiguration")
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class MyConfiguration implements ServiceRegistryExecutionPlanConfigurer {
	
	  @Bean
	  @RefreshScope
	  public ServiceRegistry serviceRegistry() {
	      return null;
	  }
	  
	  public void configureServiceRegistry(final ServiceRegistryExecutionPlan plan) {
	    plan.registerServiceRegistry(serviceRegistry());
	  }
}
